[#include "/app/common/layout/__frontmainlayout.html"/]

[#assign pageCss]
<link rel="stylesheet"
	href="${ContextPath}/admin/assets/css/bootstrap-datetimepicker.min.css" />
[/#assign]
[#assign pageJavascript]
<script>
	jQuery(function($){
		$("#offertime").datetimepicker({
			format: 'yyyy-mm-dd',
			autoclose: true,
			pickerPosition: "bottom-left",
			language:'zh-CN',
		    minView: 2,
			
		});
	});

</script>
[/#assign]

[@mainlayout pageJavascript=pageJavascript pageCss=pageCss currentMenu="reportsFlag"]
<div class="page-header">
	<h1>
		申报记录 
	</h1>
</div>

	<form class="bs-example bs-example-form" role="form" action="${ContextPath}/report/reports" method="post">
		<div class="form-inline" role="form">
			
			<div class="form-group">
				<div class="input-group">
					<div class="input-group-addon">关键字</div>
					<input class="form-control" name="title" value="${(title)!}"  placeholder="故障描述" type="text" autocomplete="off">
				</div>
			</div>
			<div class="form-group">
				<input class="form-control" id="branch" name="branch" value="${(branch)!}" placeholder="申报单位" type="text" autocomplete="off">
			</div>
			<div class="form-group">
				<input class="form-control" id="offeruser" name="offeruser" value="${(offeruser)!}" placeholder="申报人员" type="text" autocomplete="off">
			</div>
			<div class="form-group">
				<div class="input-append date form_datetime">
				<input id="offertime" name="offertime" type="text" value="${(offertime)!}" class="datetimepicker" placeholder="申报时间" readonly autocomplete="off">
				<span class="add-on"><i class="icon-remove"></i></span>
				</div>
			</div>
			<span class="form-group">
				<button class="btn btn-sm btn-default ">
					<span class="glyphicon glyphicon-search"></span>查询
				</button>
			</span>
		</div>
	</form>
	<div class="hr hr-dotted"></div>
<div class="row">
	<div class="col-xs-12">
		<div class="center">
	<table class="table table-bordered table-hover">
		<thead>
			<tr>
				<th >序号</th>
				<th >标题</th>
				<th >申报部门</th>
				<th >运维部门</th>
				<th >申报人</th>
				<th >申报时间</th>
				<th >当前状态</th>
				<th >操作</th>
			</tr>
		</thead>
				<tbody>
			[#list reportPage.getList() as report ]
			<tr >
				<td >${report_index+1}</td>
				<td style="text-align:left;">${(report.title)!}</td>
				<td style="text-align:left;">${(report.off_paname)!}</td>
				<td style="text-align:left;">${(report.deal_paname)!}</td>
				<td style="text-align:left;">${(report.off_user)!}</td>
				<td style="text-align:left;">${(report.offer_at)!}</td>
				<td >
					<b>
					[#if report.deleted_at??]
					<span class="red">已撤销</span>
					[#elseif report.status=0]
					<span class="green">已处理</span>
					[#elseif report.status=1]
					<span class="orange">处理中</span>
					[#elseif report.status=2]
					<span class="gray">未处理</span>
					[/#if]
					</b>
				</td>
				
				<td style="text-align:left;">
					<a class="btn btn-minier btn-primary "   href="${ContextPath}/report/report?id=${report.id}"  >查看</a> 
					[#if report.status==2 ]
					[#if report.deleted_at??]
					[#else]
					<a class="btn btn-minier btn-primary "  href="${ContextPath}/report/edit?id=${report.id}" >修改</a>
					[/#if]
					[/#if]
				</td>
			</tr>
			[/#list]
			
			[#if reportPage.getList().size()!=10]
			[#assign size=(10-reportPage.getList().size())]
				[#list 1..size as t]
					<tr>
						<td >${(reportPage.getList().size()+t)!}</td>
						<td></td>
						<td></td>
						<td></td>
						<td></td>
						<td></td>
						<td></td>
						<td></td>
					</tr>
				[/#list]
			[/#if]
		</tbody>
	</table>
	[#include "/app/common/inc/_paginate.html" /]
	[@paginate currentPage=reportPage.pageNumber totalPage=reportPage.totalPage actionUrl="/report/reports/" /]
		</div>
	</div>
</div>

[/@mainlayout]